import request from '@/utils/request'

const userApi = {
  // 获取供应链人员详情
  getSupplyProfile: (id) => {
    return request({
      url: `/system/supply-chain/api/getAdminUserInfo?id=${id}`,
      method: 'GET'
    })
  },
  // 更改供应链电话
  updateSupplyPhone: (data) => {
    return request({
      url: '/system/supply-chain/api/changeMobile',
      method: 'POST',
      data
    })
  },
  // 获取供应商人员详情
  getSupplierProfile: () => {
    return request({
      url: '/vms/supplier-user-info/get-current-user',
      method: 'GET'
    })
  },
  // 更改供应商电话
  updateSupplierPhone: (data) => {
    return request({
      url: '/vms/supplier-user-info/update-mobile',
      method: 'PUT',
      data
    })
  },
  // 用户密码重置
  resetUserPwd: (data) => {
    return request({
      url: '/system/user/profile/update-pwd',
      method: 'PUT',
      data
    })
  },
  // 用户密码找回
  forgetUserPwd: (data) => {
    return request({
      url: '/system/user/profile/forgetUserPwd',
      method: 'PUT',
      header: {
        isToken: false
      },
      data
    })
  },
  // 用户头像更改
  updateAvatar: (data) => {
    return request({
      url: '/system/user/changeAvatar',
      method: 'PUT',
      data
    })
  }
}
export default userApi